﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using LyyCommon;
using LyyCommonFrame.Test.Models;

namespace LyyCommonFrame.Test
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {

            var Person = new Persons()
            {
                Id = 1,
                Name = "zhangsan",
                Age = 18
            };

            var json = LyyCommon.Helper.JsonHelper.ObjectToJSON(Person);
            var myjson = Newtonsoft.Json.JsonConvert.SerializeObject(Person);
            Assert.IsNotNull(json);
            Assert.AreEqual(json, myjson);
        }
    }


}
